home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: tjensen@ix.netcom.com (Ted Jensen)
- Newsgroups: comp.lang.c
- Subject: Re: Defining 2dim array at runtime
- Date: Tue, 02 Jan 1996 18:28:59 GMT
- Organization: Netcom
- Message-ID: <4cbtgh$6o0@ixnews8.ix.netcom.com>
- References: <4c4m63$odr@newstand.syr.edu>
- Reply-To: tjensen@ix.netcom.com
- NNTP-Posting-Host: pax-ca14-11.ix.netcom.com
- X-NETCOM-Date: Tue Jan 02 10:28:34 AM PST 1996
- X-Newsreader: Forte Free Agent 1.0.82
-
- Mohamed Jeragh <maj@top.cis.syr.edu> wrote:
-
- > How can I define a 2 dimensional array at runtime?
- >for example, let a be the array
- >int **a;
- >what will the malloc/calloc statement be? such that I can refer
- >to the array a[i][j] ?
-
- There are a variety of ways to do this. My tutorial on pointers and
- arrays covers them all. It is called ptrtut01.zip and available at
- either:
-
- http://oak.oakland.edu:8080/SimTel/msdos/c/ptrtut01.zip
-
- or at
-
- ftp.coast.net/SimTel/msdos/c/ptrtut01.zip
-
- Hope this helps!
- Ted-
-
-
- Ted Jensen Author of PTRTUT01.ZIP
- Redwood City, CA A tutorial on C pointers and Arrays
- tjensen@ix.netcom.com Available via Simtel/msdos/c
-
-